package com.twu.biblioteca;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * Created with IntelliJ IDEA.
 * User: ruchita
 * Date: 23/9/13
 * Time: 11:11 AM
 * To change this template use File | Settings | File Templates.
 */
public class MovieInformation {
    HashMap<String,ArrayList> infoMap;
    public void createDatabase() {
         infoMap=new HashMap<String, ArrayList>();
        addMovie("sholay",1987,"Ramesh Sippy",null);
        addMovie("K3G",1998,"Karan Johar",9);
        addMovie("Mera Naam Joker",1980,"Raj Kapoor",8);
        addMovie("3 Idiots",2009,"Amir Khan",10);
        addMovie("Bhaag Milkha Bhag",2013,"Ramesh Sippy",10);
        addMovie("Munna Bhai MBBS",2000,"Ramesh Sippy",8);
        addMovie("Despicable Me 2",2013,"Hollywood",8);
        addMovie("Transformer",2007,"Hollywood",8);
        addMovie("LunchBox",1987,"Ramesh Sippy",10);
        addMovie("Krish3",2014,"Karan Johar",null);
        addMovie("Mera Naam Joker",1980,"Raj Kapoor",8);
        addMovie("sholay",1987,"Ramesh Sippy",null);
        addMovie("K3G",1998,"Karan Johar",9);
        addMovie("Mera Naam Joker",1980,"Raj Kapoor",8);
    }

    private void addMovie(String movieName,Integer year,String director,Integer rating) {
        ArrayList al=new ArrayList() ;
        al.add(year);
        al.add(director);
        al.add(rating);
        infoMap.put(movieName,al);
    }

    public HashMap<String,ArrayList> getMovieInfo() {

        return infoMap;
    }
}
